using System;
using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Migrations;
using Sino.CapacityCloud.Repositories.Models;

namespace Sino.CapacityCloud.Repositories.Migrations
{
    [DbContext(typeof(ApplicationDbContext))]
    partial class ApplicationDbContextModelSnapshot : ModelSnapshot
    {
        protected override void BuildModel(ModelBuilder modelBuilder)
        {
            modelBuilder
                .HasAnnotation("ProductVersion", "7.0.0-rc1-16348")
                .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);

            modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("ClaimType");

                    b.Property<string>("ClaimValue");

                    b.Property<string>("RoleId")
                        .IsRequired();

                    b.HasKey("Id");

                    b.HasAnnotation("Relational:TableName", "AspNetRoleClaims");
                });

            modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
                {
                    b.Property<int>("Id")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("ClaimType");

                    b.Property<string>("ClaimValue");

                    b.Property<string>("UserId")
                        .IsRequired();

                    b.HasKey("Id");

                    b.HasAnnotation("Relational:TableName", "AspNetUserClaims");
                });

            modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
                {
                    b.Property<string>("LoginProvider");

                    b.Property<string>("ProviderKey");

                    b.Property<string>("ProviderDisplayName");

                    b.Property<string>("UserId")
                        .IsRequired();

                    b.HasKey("LoginProvider", "ProviderKey");

                    b.HasAnnotation("Relational:TableName", "AspNetUserLogins");
                });

            modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
                {
                    b.Property<string>("UserId");

                    b.Property<string>("RoleId");

                    b.HasKey("UserId", "RoleId");

                    b.HasAnnotation("Relational:TableName", "AspNetUserRoles");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.AccidentPicture", b =>
                {
                    b.Property<string>("AccidentPictureId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("AccidentPictureKey");

                    b.Property<string>("CostId");

                    b.HasKey("AccidentPictureId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.ApplicationRole", b =>
                {
                    b.Property<string>("Id");

                    b.Property<string>("ConcurrencyStamp")
                        .IsConcurrencyToken();

                    b.Property<string>("Name")
                        .HasAnnotation("MaxLength", 256);

                    b.Property<string>("NormalizedName")
                        .HasAnnotation("MaxLength", 256);

                    b.HasKey("Id");

                    b.HasIndex("NormalizedName")
                        .HasAnnotation("Relational:Name", "RoleNameIndex");

                    b.HasAnnotation("Relational:TableName", "AspNetRoles");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.ApplicationUser", b =>
                {
                    b.Property<string>("Id");

                    b.Property<int>("AccessFailedCount");

                    b.Property<string>("Address");

                    b.Property<string>("AvatarKey");

                    b.Property<string>("CarId");

                    b.Property<int>("CarriageType");

                    b.Property<string>("CarrierCarrierId");

                    b.Property<int>("CertificatePhotoCertificationState");

                    b.Property<string>("CertificatePhotoKey");

                    b.Property<DateTime>("CertificationApplicationTime");

                    b.Property<DateTime>("CertificationTime");

                    b.Property<string>("ConcurrencyStamp")
                        .IsConcurrencyToken();

                    b.Property<string>("DeviceToken");

                    b.Property<string>("DrivingLicenseKey");

                    b.Property<int>("DrivingLicenseKeyCertificationState");

                    b.Property<string>("Email")
                        .HasAnnotation("MaxLength", 256);

                    b.Property<bool>("EmailConfirmed");

                    b.Property<long>("FailureTime");

                    b.Property<int>("IdentityCardCertificationState");

                    b.Property<string>("IdentityCardKey");

                    b.Property<bool>("LockoutEnabled");

                    b.Property<DateTimeOffset?>("LockoutEnd");

                    b.Property<string>("NormalizedEmail")
                        .HasAnnotation("MaxLength", 256);

                    b.Property<string>("NormalizedUserName")
                        .HasAnnotation("MaxLength", 256);

                    b.Property<string>("PasswordHash");

                    b.Property<string>("PhoneNumber");

                    b.Property<bool>("PhoneNumberConfirmed");

                    b.Property<string>("Profile");

                    b.Property<string>("RealName");

                    b.Property<string>("SecurityStamp");

                    b.Property<string>("Token");

                    b.Property<bool>("TwoFactorEnabled");

                    b.Property<string>("UserName")
                        .HasAnnotation("MaxLength", 256);

                    b.HasKey("Id");

                    b.HasIndex("NormalizedEmail")
                        .HasAnnotation("Relational:Name", "EmailIndex");

                    b.HasIndex("NormalizedUserName")
                        .HasAnnotation("Relational:Name", "UserNameIndex");

                    b.HasAnnotation("Relational:TableName", "AspNetUsers");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.Bank", b =>
                {
                    b.Property<string>("BankId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Code");

                    b.Property<string>("LogoKey");

                    b.Property<string>("Name");

                    b.HasKey("BankId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.BankCard", b =>
                {
                    b.Property<string>("BankCardId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("BankId");

                    b.Property<string>("Holder");

                    b.Property<string>("Number");

                    b.Property<string>("Type");

                    b.Property<string>("UserId");

                    b.HasKey("BankCardId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.Car", b =>
                {
                    b.Property<string>("CarId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("AddingCommitId");

                    b.Property<double>("AssignmentOfLoad");

                    b.Property<bool?>("CanTargeted");

                    b.Property<int>("CarriageType");

                    b.Property<string>("CarrierId");

                    b.Property<int>("CertificationStatus");

                    b.Property<string>("Code");

                    b.Property<DateTime?>("Date");

                    b.Property<bool>("IsEnabled");

                    b.Property<int>("Length");

                    b.Property<string>("Origin");

                    b.Property<string>("Rank");

                    b.Property<string>("Remarks");

                    b.Property<string>("State");

                    b.Property<int>("TrailerLicenseCertificationStatus");

                    b.Property<string>("TrailerLicenseKey");

                    b.Property<int>("Type");

                    b.Property<string>("VehicleLicenseKey");

                    b.Property<int>("VehiclePhotoCertificationStatus");

                    b.Property<string>("VehiclePhotoKey");

                    b.HasKey("CarId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.CarAddingModerationCommit", b =>
                {
                    b.Property<string>("CarAddingModerationCommitId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Address");

                    b.Property<DateTime>("ApplicationTime");

                    b.Property<double>("AssignmentOfLoad");

                    b.Property<string>("CarCode");

                    b.Property<int>("CarriageType");

                    b.Property<string>("Committer");

                    b.Property<string>("Driver");

                    b.Property<int>("Length");

                    b.Property<string>("PhoneNumber");

                    b.Property<string>("Source");

                    b.Property<int>("Type");

                    b.HasKey("CarAddingModerationCommitId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.Carrier", b =>
                {
                    b.Property<string>("CarrierId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Name");

                    b.Property<int>("Type");

                    b.HasKey("CarrierId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.CommonTransportLinkage", b =>
                {
                    b.Property<string>("CommonTransportLinkageId")
                        .ValueGeneratedOnAdd();

                    b.Property<DateTime?>("OperationTime");

                    b.Property<string>("Remarks");

                    b.Property<string>("TransportLinkageId");

                    b.Property<string>("UserId");

                    b.HasKey("CommonTransportLinkageId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.ConfirmedOrder", b =>
                {
                    b.Property<string>("ConfirmedOrderId")
                        .ValueGeneratedOnAdd();

                    b.Property<double>("Amount");

                    b.Property<string>("AmountUnit");

                    b.Property<DateTime>("ArrivalTime");

                    b.Property<string>("CarCode");

                    b.Property<string>("CarLength");

                    b.Property<string>("CarrierOrderId");

                    b.Property<string>("Category");

                    b.Property<string>("ContactChatId");

                    b.Property<string>("ContactName");

                    b.Property<string>("ContactPhoneNumber");

                    b.Property<DateTime>("DeliveryTime");

                    b.Property<int>("DrawableCostCount");

                    b.Property<double>("Emergency");

                    b.Property<string>("GrabComment");

                    b.Property<bool>("IsFocus");

                    b.Property<string>("OrderNumber");

                    b.Property<string>("ParentConfirmedOrderId");

                    b.Property<string>("Price");

                    b.Property<string>("Remarks");

                    b.Property<int>("State");

                    b.Property<string>("TransportLinkageId");

                    b.Property<int>("Type");

                    b.Property<string>("UserId");

                    b.HasKey("ConfirmedOrderId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.Cost", b =>
                {
                    b.Property<string>("CostId")
                        .ValueGeneratedOnAdd();

                    b.Property<long>("ApplyTime");

                    b.Property<string>("AuditState");

                    b.Property<string>("CarrierOrderId");

                    b.Property<double>("CostPrice");

                    b.Property<string>("CostType");

                    b.Property<string>("Description");

                    b.Property<string>("UserId");

                    b.HasKey("CostId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.FavouriteTransportLinkage", b =>
                {
                    b.Property<string>("FavouriteTransportLinkageId")
                        .ValueGeneratedOnAdd();

                    b.Property<DateTime?>("OperationTime");

                    b.Property<string>("Remarks");

                    b.Property<string>("TransportLinkageId");

                    b.Property<string>("UserId");

                    b.HasKey("FavouriteTransportLinkageId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.FriendRelationship", b =>
                {
                    b.Property<string>("FriendRelationshipId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("FriendId");

                    b.Property<string>("UserId");

                    b.HasKey("FriendRelationshipId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.Location", b =>
                {
                    b.Property<string>("LocationId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Address");

                    b.Property<string>("CarId");

                    b.Property<double>("Latitude");

                    b.Property<bool>("LocationStatus");

                    b.Property<double>("Longitude");

                    b.Property<DateTime>("Time");

                    b.Property<string>("UserId");

                    b.HasKey("LocationId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.Order", b =>
                {
                    b.Property<string>("OrderId")
                        .ValueGeneratedOnAdd();

                    b.Property<double>("Amount");

                    b.Property<string>("AmountUnit");

                    b.Property<DateTime>("ArrivalTime");

                    b.Property<string>("CarCode");

                    b.Property<string>("CarLength");

                    b.Property<string>("CarrierOrderId");

                    b.Property<string>("Category");

                    b.Property<string>("ContactChatId");

                    b.Property<string>("ContactName");

                    b.Property<string>("ContactPhoneNumber");

                    b.Property<DateTime>("DeliveryTime");

                    b.Property<double>("Emergency");

                    b.Property<string>("GrabComment");

                    b.Property<bool>("IsFocus");

                    b.Property<string>("OrderNumber");

                    b.Property<string>("ParentOrderId");

                    b.Property<string>("Price");

                    b.Property<string>("Remarks");

                    b.Property<int>("State");

                    b.Property<string>("TransportLinkageId");

                    b.Property<int>("Type");

                    b.Property<string>("UserId");

                    b.HasKey("OrderId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.PaidCost", b =>
                {
                    b.Property<string>("PaidCostId")
                        .ValueGeneratedOnAdd();

                    b.Property<DateTime>("ApplyTime");

                    b.Property<decimal>("CostPrice");

                    b.Property<string>("CostType");

                    b.Property<string>("Description");

                    b.Property<string>("QuotationId");

                    b.HasKey("PaidCostId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.PayableCost", b =>
                {
                    b.Property<string>("PayableCostId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("CarrierOrderId");

                    b.Property<int>("CostType");

                    b.Property<int>("DrawCashStatus");

                    b.Property<string>("OrderId");

                    b.Property<DateTime>("PaymentDate");

                    b.Property<int>("PaymentMethod");

                    b.Property<decimal>("Price");

                    b.Property<int>("Progress");

                    b.Property<string>("Remarks");

                    b.Property<int>("SettleType");

                    b.HasKey("PayableCostId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.PaymentHistory", b =>
                {
                    b.Property<string>("PaymentHistoryId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("CarrierOrderId");

                    b.Property<string>("CostId");

                    b.Property<DateTime>("LastPaymentTime");

                    b.Property<int>("PaymentResultStatus");

                    b.Property<double>("Price");

                    b.Property<string>("SettleBillCode");

                    b.Property<string>("SettleBillId");

                    b.Property<int>("Status");

                    b.Property<DateTime>("SucceededTime");

                    b.Property<int>("Type");

                    b.Property<string>("UserId");

                    b.HasKey("PaymentHistoryId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.Quotation", b =>
                {
                    b.Property<string>("QuotationId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Description");

                    b.Property<string>("OrderId");

                    b.Property<double>("Price");

                    b.Property<string>("Remarks");

                    b.Property<DateTime>("Time");

                    b.Property<int>("Unit");

                    b.Property<string>("UserId");

                    b.HasKey("QuotationId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.RatingRecord", b =>
                {
                    b.Property<string>("RatingRecordId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("Appraiser");

                    b.Property<float>("Attitude");

                    b.Property<string>("CarId");

                    b.Property<string>("CarrierOrderId");

                    b.Property<string>("ContractNumber");

                    b.Property<string>("Driver");

                    b.Property<string>("Evaluation");

                    b.Property<float>("Integrity");

                    b.Property<string>("OrderId");

                    b.Property<string>("PhoneNumber");

                    b.Property<float>("Pricing");

                    b.Property<string>("Remarks");

                    b.Property<DateTime>("Time");

                    b.Property<float>("Timeliness");

                    b.Property<string>("UserId");

                    b.HasKey("RatingRecordId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.SmsCode", b =>
                {
                    b.Property<string>("SmsId")
                        .ValueGeneratedOnAdd();

                    b.Property<DateTime?>("ApproveTime");

                    b.Property<string>("Code");

                    b.Property<DateTime>("CreationTime");

                    b.Property<DateTime>("FailureTime");

                    b.Property<string>("PhoneNumber");

                    b.Property<string>("Remarks");

                    b.Property<int>("StatusCode");

                    b.HasKey("SmsId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.TransportLinkage", b =>
                {
                    b.Property<string>("TransportLinkageId")
                        .ValueGeneratedOnAdd();

                    b.Property<double>("DestinationLocationLongitude")
                        .HasAnnotation("Relational:ColumnName", "DestinationLocation_Longitude");

                    b.Property<double>("DestinationLocationnLatitude")
                        .HasAnnotation("Relational:ColumnName", "DestinationLocation_Latitude");

                    b.Property<string>("DestinationPlaceCode");

                    b.Property<string>("DestinationPlaceName");

                    b.Property<string>("Remarks");

                    b.Property<string>("StartingPlaceCode");

                    b.Property<double>("StartingPlaceLocationLatitude")
                        .HasAnnotation("Relational:ColumnName", "StartingPlaceLocation_Latitude");

                    b.Property<double>("StartingPlaceLocationLongitude")
                        .HasAnnotation("Relational:ColumnName", "StartingPlaceLocation_Longitude");

                    b.Property<string>("StartingPlaceName");

                    b.HasKey("TransportLinkageId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.TransportLinkageDispacherTask", b =>
                {
                    b.Property<string>("TransportLinkageDispacherTaskId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("CarId");

                    b.Property<string>("Dispacher");

                    b.Property<string>("UserId");

                    b.HasKey("TransportLinkageDispacherTaskId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.UserFocusedConfirmedOrder", b =>
                {
                    b.Property<string>("UserFocusedOrderId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("ConfirmedOrderId");

                    b.Property<string>("UserId");

                    b.HasKey("UserFocusedOrderId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.UserPointRecord", b =>
                {
                    b.Property<string>("UserPointRecordId")
                        .ValueGeneratedOnAdd();

                    b.Property<double?>("AvailablePoints");

                    b.Property<string>("Remarks");

                    b.Property<double?>("TotalPoints");

                    b.Property<string>("UserId");

                    b.HasKey("UserPointRecordId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.WebApiCredential", b =>
                {
                    b.Property<string>("WebApiCredentialId")
                        .ValueGeneratedOnAdd();

                    b.Property<string>("AppKey");

                    b.Property<string>("AppSecrect");

                    b.HasKey("WebApiCredentialId");
                });

            modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityRoleClaim<string>", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationRole")
                        .WithMany()
                        .HasForeignKey("RoleId");
                });

            modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<string>", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<string>", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<string>", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationRole")
                        .WithMany()
                        .HasForeignKey("RoleId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.AccidentPicture", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.Cost")
                        .WithMany()
                        .HasForeignKey("CostId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.ApplicationUser", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.Car")
                        .WithMany()
                        .HasForeignKey("CarId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.Carrier")
                        .WithMany()
                        .HasForeignKey("CarrierCarrierId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.BankCard", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.Bank")
                        .WithMany()
                        .HasForeignKey("BankId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.Car", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.CarAddingModerationCommit")
                        .WithMany()
                        .HasForeignKey("AddingCommitId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.Carrier")
                        .WithMany()
                        .HasForeignKey("CarrierId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.CommonTransportLinkage", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.TransportLinkage")
                        .WithMany()
                        .HasForeignKey("TransportLinkageId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.ConfirmedOrder", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ConfirmedOrder")
                        .WithMany()
                        .HasForeignKey("ParentConfirmedOrderId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.TransportLinkage")
                        .WithMany()
                        .HasForeignKey("TransportLinkageId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.FavouriteTransportLinkage", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.TransportLinkage")
                        .WithMany()
                        .HasForeignKey("TransportLinkageId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.FriendRelationship", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("FriendId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.Location", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.Car")
                        .WithMany()
                        .HasForeignKey("CarId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.Order", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.Order")
                        .WithMany()
                        .HasForeignKey("ParentOrderId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.TransportLinkage")
                        .WithMany()
                        .HasForeignKey("TransportLinkageId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.PaymentHistory", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.Quotation", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.Order")
                        .WithMany()
                        .HasForeignKey("OrderId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.RatingRecord", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.Car")
                        .WithMany()
                        .HasForeignKey("CarId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ConfirmedOrder")
                        .WithMany()
                        .HasForeignKey("OrderId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.TransportLinkageDispacherTask", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.Car")
                        .WithMany()
                        .HasForeignKey("CarId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.UserFocusedConfirmedOrder", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ConfirmedOrder")
                        .WithMany()
                        .HasForeignKey("ConfirmedOrderId");

                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });

            modelBuilder.Entity("Sino.CapacityCloud.Repositories.Models.UserPointRecord", b =>
                {
                    b.HasOne("Sino.CapacityCloud.Repositories.Models.ApplicationUser")
                        .WithMany()
                        .HasForeignKey("UserId");
                });
        }
    }
}
